abstract class Car(val name:String){
   val carBrand:String
   var price:Int=0
   def info()
   def drive(){
        println("my car is good")
}  
   def this(name:String,price:Int){
        this(name)
        this.price=price     
}
}
class ElectricCar(name:String,price:Int) extends Car(name,price){
    val carBrand="benci"
    val carcolor="green"
    override def info(){
            printf("this is a %s car,is %s and it is price is %d.\n", carBrand,carcolor,price)
}

}
object Mycar{
    def main (args:Array[String]){
         var car=new ElectricCar("Mike's Car",30000)
         show(car)
}
    def show(thecar:Car)={thecar.drive;thecar.info()}
} 

   
